<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/1/9
 * Time: 18:49
 */
function ajaxReturn($status=0,$message='',$data=array()){
    $result=array(
        'status'=>$status,
        'message'=>$message,
        'data'=>$data
    );
    exit(json_encode($result));
}
function showKind($status,$data) {
    header('Content-type:application/json;charset=UTF-8');
    if($status==0) {
        exit(json_encode(array('error'=>0,'url'=>$data)));
    }
    exit(json_encode(array('error'=>1,'message'=>'上传失败')));
}
function level($lv){
    if($lv==0){
        $str='';
    }else{
        $str='';
        for($i=1;$i<=$lv;$i++){
            $s=str_repeat('-', 8);
            $str=$str.'|'.$s;
        }

    }
    return $str;
}
